#include "Fp2DGraphicTest.h"

#include "FpHistogramGraphic.h"

#include <QSharedPointer>
#include <QDebug>

Fp2DGraphicTest::Fp2DGraphicTest(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Fp2DGraphicTestClass())
{
    ui->setupUi(this);
    _dia = new QDialog(this);
}

Fp2DGraphicTest::~Fp2DGraphicTest()
{
    delete ui;
}

void Fp2DGraphicTest::on_pushButton_histogram_clicked()
{
    QVector<double> datas{10,200,300,400};
	QSharedPointer<FpHistogramGraphic> his(new FpHistogramGraphic(_dia));
    his->SetYAxisData(datas);
    his->DrawBarChart();
    _dia->exec();
}

void Fp2DGraphicTest::mouseMoveEvent(QMouseEvent* event)
{
	qDebug() << "mouse move1: " << event->pos();
	QWidget::mouseMoveEvent(event);
}
